#ifndef SWITCHRAIL_H
#define SWITCHRAIL_H

#include "Arduino.h"
#include "SwitchRailData.h"
#include "SwitchRailListener.h"
#include "LED.h"
#include "Switch.h"
#include "SwitchListener.h"

class SwitchRail : public SwitchListener {
  public:
  SwitchRail(SwitchRailListener* listener, SwitchRailData switchRailData);  // Constructor
  /* Methodes */
  virtual void switchPositionChanged(boolean state);
  void switchRailCommandAccepted();
  void switchRailCommandDelayed();
  byte getId();
  
  private:
  /* Attributs */
  byte m_id;
  Switch* m_switch;
  LED* m_LED;
  SwitchRailListener* m_listener;
 
};

#endif /* SWITCHRAIL_H */
